<template>
  <el-input :type="inputType" prefix-icon="el-icon-bell" placeholder="密码">
    <a style="cursor:pointer" slot="append" circle icon="el-icon-view" @mousedown.stop="setInputType('text','eye')"
       @mouseup.stop="setInputType('password','eye-slash')">
      <font-awesome-icon :icon="eyeIcon"/>
    </a>
  </el-input>
</template>

<script>

  export default {
    name: "ElPasswordInput",
    data() {
      return {
        inputType: 'password',
        eyeIcon: 'eye-slash'
      }
    },
    mounted() {

    },
    methods: {
      setInputType(type,ico) {
        this.inputType = type;
        this.eyeIcon = ico;
      }
    }
  }
</script>

<style scoped>

</style>
